console.log("index");
$(function () {
  $('#register').click(function (){
    if ($("form").attr('method')!="post"){
      $("form").attr('method',"post");
    }
   let useremail=$('#useremail').val();
    let userpassword=$("#userpassword").val();
    $.ajax({
      type:'post',
      url:'/user/register.do',
      contentType: "application/json",
      data:JSON.stringify({
        useremail,
        userpassword
      }),
      success: function (result) {
        console.log(result);
      },
      error: function () {
        console.log("Send Request Fail..");
      },
    })
  })
})